<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.prime.com.tr/ui">
<ui:composition>
	<h:panelGrid style="margin: 0 auto;">
		<h:form id="edicao">
			<h:messages />
			<h:inputHidden  />
			<h:panelGrid columns="10">
			<h:outputLabel value="Sigla" for="sigla" />
				<h:inputText id="sigla" value ="#{acaoBean.acao.sigla}" required="true" maxlength="10" size="10" />
				<h:outputLabel value="Descrição" for="descricao" />
				<h:inputText id="descricao" value ="#{acaoBean.acao.descricao}" maxlength="30" size="10" required="true"/>
				<h:outputLabel value="Qt. de Quotas" for="quantidade" />
				<h:inputText id="quantidade" value ="#{acaoBean.acao.quantidade}" required="true" size="6">
				</h:inputText>
				<h:outputLabel value="Valor de compra" for="valor_de_compra" />
				<h:inputText id="valor_de_compra" value ="#{acaoBean.acao.valor_compra}" maxlength="30" size="10"  required="true"/>
				
			

				<p:commandButton value="Salvar" onclick="confirmation.show()"/>
				<p:confirmDialog zindex="999" message="Deseja salvar os dados?" header="Pergunta" severity="info" widgetVar="confirmation">
        			<p:commandButton value="Sim" update="edicao, listagem, graficosCarteira" oncomplete="confirmation.hide()" actionListener="#{acaoBean.salvar}" />  
        			<p:commandButton value="Não" onclick="confirmation.hide()" type="button" />  
				</p:confirmDialog>
				
			</h:panelGrid>
		</h:form>
	</h:panelGrid>
</ui:composition>
</html>
